package org.gl.nio;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;

public class Test {

	static int i = 0;

	public static void main(String[] args) throws IOException,
			InterruptedException {
//		while (i < 10000) {
			conncetClient();
//			System.out.println("" + i);
//			Thread.sleep(10);
//			i++;
//		}
	}

	private static void conncetClient() {
		try {
			Socket mSocket = new Socket();
			 mSocket.connect(new InetSocketAddress("192.168.30.22", 1801));
			mSocket.getOutputStream().write(("hello我" + i).getBytes());
			mSocket.getOutputStream().flush();
			// mSocket.getOutputStream().close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
